package com.fwmagic.springcloud.service;

import com.fwmagic.springcloud.entities.CommonResult;
import com.fwmagic.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @description: 使用 fallback方式是无法获取异常信息的，
 * 如果想要获取异常信息，可以使用fallbackFactory参数
 * @author: fangwei
 * @date: 2022/5/6
 **/
@FeignClient(value = "nacos-payment-provider", fallback = PaymentFallbackService.class)
public interface PaymentService {

    @GetMapping("/paymentSQL/{id}")
    public CommonResult<Payment> paymentSQL(@PathVariable("id") Long id);
}
